package com.dong.dao.User;

import com.dong.pojo.Role;
import com.dong.pojo.User;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    //得到要登录的用户
    public User getLoginUser(Connection connection,String userCode) throws SQLException;
    //修改当前用户的密码
    public int updatePwd(Connection connection,int id,String userPassword) throws SQLException;
    //通过条件查询-用户表记录数
    public int getUserCount(Connection connection,String username,int userRole) throws SQLException;
    //通过条件去查询用户列表
    public List<User> getUserList(Connection connection,String username,int userRole,int currentPageNo,int pageSize) throws SQLException;
    //通过用户id查找用户
    public User getUserByid(Connection connection,String id) throws SQLException;
    //添加一新用户
    public int addUser(Connection connection,User user) throws SQLException;
    //修改一个用户的个人信息
    public int modifyUser(Connection connection,User user) throws SQLException;
    //删除用户个人信息
    public int deleteUserById(Connection connection,Integer delid) throws SQLException;

}
